package com.base;

/**
 * @author: sun.hongliang
 * @create: 2019/11/11 11:40
 */
public class StringTest {
    public static void main(String[] args) {
        Student[] src = {new Student("a")};
        Student[] dis = new Student[1];
        System.arraycopy(src, 0, dis, 0, 1);
        System.out.println(dis[0].getName());
        src[0].setName("b");
        System.out.println(dis[0].getName());
    }
}

class Student {
    private String name;

    public Student(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
